import request from "./request";

/**
 * 获取学生列表
 * @returns
 */
export function getStuListApi() {
  return request({
    url: "/student",
    method: "GET",
  });
}
export function addStuApi(data) {
  return request({
    url: "/student",
    method: "POST",
    data,
  });
}
export function getDetailByIdApi(id) {
  return request({
    url: `/student/${id}`,
    method: "GET",
  });
}
export function deleteStuByIdApi(id) {
  return request({
    url: `/student/${id}`,
    method: "DELETE",
  });
}
export function editStuByIdApi(id, data) {
  return request({
    url: `/student/${id}`,
    method: "PATCH",
    data,
  });
}
